//
//  UserTableViewCell.m
//  MyListenMusicFun
//
//  Created by dllo on 16/1/20.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "UserTableViewCell.h"

@implementation UserTableViewCell



-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.headImgView = [[UIImageView alloc] init];
//        _headImgView.backgroundColor = [UIColor cyanColor];
        _headImgView.layer.cornerRadius = 25;
        _headImgView.clipsToBounds = YES;
        [self.contentView addSubview:_headImgView];
        
        self.nicknameLabel = [[UILabel alloc] init];
//        _nicknameLabel.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_nicknameLabel];
        
        self.markImgView = [[UIImageView alloc] init];
//        _markImgView.backgroundColor = [UIColor orangeColor];
        _markImgView.image = [UIImage imageNamed:@"memberTwo"];
        [self.contentView addSubview:_markImgView];
        
        self.soundLabel = [[UILabel alloc] init];
//        _soundLabel.backgroundColor = [UIColor greenColor];
        _soundLabel.text = @"声音";
        _soundLabel.textColor = [UIColor grayColor];
        _soundLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_soundLabel];
        
        self.tracksLabel = [[UILabel alloc] init];
//        _tracksLabel.backgroundColor = [UIColor blueColor];
        _tracksLabel.textColor = [UIColor grayColor];
        _tracksLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_tracksLabel];
        
        self.hotLabel = [[UILabel alloc] init];
//        _hotLabel.backgroundColor = [UIColor greenColor];
        _hotLabel.text = @"粉丝";
        _hotLabel.textColor = [UIColor grayColor];
        _hotLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_hotLabel];
        
        self.followersLabel = [[UILabel alloc] init];
//        _followersLabel.backgroundColor = [UIColor blueColor];
        _followersLabel.textColor = [UIColor grayColor];
        _followersLabel.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_followersLabel];
        
        self.ptitleLabel = [[UILabel alloc] init];
//        _ptitleLabel.backgroundColor = [UIColor cyanColor];
        _ptitleLabel.textColor = [UIColor grayColor];
        _ptitleLabel.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:_ptitleLabel];
        
        self.likeImgView = [[UIImageView alloc] init];
//        _likeImgView.backgroundColor = [UIColor orangeColor];
        _likeImgView.image = [UIImage imageNamed:@"listenTwo"];
        [self.contentView addSubview:_likeImgView];
    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    _headImgView.frame = CGRectMake(10, 10, 50, 50);
    _nicknameLabel.frame = CGRectMake(65, 0, 100, 20);
    _markImgView.frame = CGRectMake(170, 0, 20, 20);
    _soundLabel.frame = CGRectMake(65, 25, 30, 20);
    _tracksLabel.frame = CGRectMake(95, 25, 45, 20);
    _hotLabel.frame = CGRectMake(150, 25, 30, 20);
    _followersLabel.frame = CGRectMake(180, 25, 45, 20);
    _ptitleLabel.frame = CGRectMake(65, 50, 150, 20);
    _likeImgView.frame = CGRectMake(self.contentView.frame.size.width - 50, 20, 30, 30);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
